<template>

  <div class="header" :style="{backgroundColor:background,color}">
    <div @click="shang" class="van"><van-icon name="arrow-left" /></div>
      {{title}}
  </div>
</template>

<script>
export default {
  props:{
    // background: String,
    // color:{
    //   type:String,
    //   default:"#fff"
    // },
    title:{
      type:String,
      require:true,
    }
  },
  methods: {
    shang(){
      this.$router.push({ path: "/Carts" });
    }
  }
}
</script>

<style lang="less" scoped>
.van{
  float: left;
}
.header{
    width: 100%;
    height: 61px;
    background-color: #fdfefe;
    text-align: center;
    color:rgba(183, 138, 101, 1);
    position:fixed;
    font-size: 20px;
    line-height: 60px;
    top: 0;
    left: 0;
    z-index: 2;
}
</style>